package com.itlong.cloud.property.resource;

import com.itlong.cloud.POJO.DTO.property.PropertyVisitorPassRecordGetDTO;
import com.itlong.cloud.POJO.VO.property.PropertyVisitorPassRecordGetVO;
import com.itlong.cloud.user.property.IPropertyVisitorPassRecordServiceClient;
import com.itlong.cloud.property.service.IPropertyVisitorPassRecordService;
import com.itlong.cloud.utils.page.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * <desc>
 *      访客通行记录暴露接口实现类。
 * </desc>
 *
 * @createDate 2018/06/27
 */
@RestController
public class PropertyVisitorPassRecordServiceResource implements IPropertyVisitorPassRecordServiceClient {

    @Autowired
    IPropertyVisitorPassRecordService iPropertyVisitorPassRecordService;

    /**
     * <desc>
     *     访客通行记录列表
     * <desc/>
     *
     *@param  visitorPassRecordGetDTO  分页查询访客通行记录
     * @return  MessageVO 标准格式化响应结果
     * @author JuGuang.S
     * @createDate 2018/06/27
     */
    @PostMapping(path = "/getVisitorPassRecordByPage")
    public Page<PropertyVisitorPassRecordGetVO> getVisitorPassRecordByPage(@RequestBody PropertyVisitorPassRecordGetDTO visitorPassRecordGetDTO) throws Exception {
        return iPropertyVisitorPassRecordService.getVisitorPassRecordByPage(visitorPassRecordGetDTO);
    }


}